package com.newegg.nlp.arangodb.dao;

import com.newegg.nlp.arangodb.BasicDao;
import com.newegg.nlp.arangodb.model.Item;

public interface ItemDao extends BasicDao<Item>{

	default Item getOrCreate(String id, String name) {
		Item item = get(id);
		if(item == null) {
			item = new Item();
			item.setId(id);
			item.setName(name);
			item.setItemnumber(id);
			saveNotExist(item);
		}
		return item;
	};
}
